'use strict'
import {query} from "../services/homeService";

export default {

  namespace: 'main',

  state: {
    currentMenu:'',
  },

  subscriptions: {

  },

  effects: {
    * search({val}, {call, put}) {  // eslint-disable-line
      const res = yield call(_=>query(val));
      console.log(res);
      yield put({type: 'save'});
    },
  },

  reducers: {
    currentMenu(state = {}, {city = []}) {
      return {...state, city};
    },
  },

};
